﻿package tv.colmeia.events {
	import flash.events.Event;
	
	/**
	* ...
	* @author Martin Fabichak @ colmeia.tv
	*/
	public class GameSocketEvent extends Event {
		private var _key:int;
		static public const GAME_EVENT:String = "GAME";
		
		public function GameSocketEvent(type:String, pressedKey:int , bubbles:Boolean=false, cancelable:Boolean=false) { 
			_key = pressedKey;
			super(type, bubbles, cancelable);
			
		} 
		
		public override function clone():Event { 
			return new GameSocketEvent(type,_key, bubbles, cancelable);
		} 
		
		public override function toString():String { 
			return formatToString("GameSocketEvent", "type", "bubbles", "cancelable", "eventPhase"); 
		}
		
		public function get key():int { return _key; }
		
	}
	
}